/** 该文件仅存放服务模块相关的接口 */
import myaxios from "../MyAxios";
import BASEURL from '../BaseUrl'
const {DWURL} = BASEURL

const serveApi = {
  /** 获取城市 */
  queryAllserve(){
    return myaxios.get(DWURL + '/serve-type')
  },

  queryserveByyW(){
    return myaxios.get(DWURL + '/serve-queryAll')
  },
  /**
   * 按服务类型查询服务详情接口
   * @param{Object} params{page:1,pagesize:5,swork:,busclass:'上门维修' }
   */
  queryserveByst(params:{page:number,pagesize:number,swork?:string,busclass:string}){
    let url = DWURL + '/serve-ByType'
    return myaxios.get(url,params)
  },
  /**
   * 按业务名称查询服务类型接口
   * @param{Object} params{busclass:''}
   */
  queryByServeName(params:{busclass:string}){
    let url = DWURL + '/query-fw'
    return myaxios.get(url, params)
  },
  /**
   * 关键字查询服务详情（标题，服务商，服务类型，业务类型）
   * @param{Object} params{key:''}
   */
  queryServeByKeyword(params:{key:string}){
    let url = DWURL+'/search-Bykey'
    return myaxios.get(url,params)
  },
  /**
   * 按销量从高到低排序
   *  @param{Object} params{page:1,pagesize:5,swork:,busclass:'上门维修' }
   */
  queryServeByXl(params:{page:number,pagesize:number,swork?:string,busclass:string}){
    let url = DWURL + '/serve-sort-sales'
    return myaxios.get(url,params)
  },
  //按好评
  queryServeByHP(params:{page:number,pagesize:number,swork?:string,busclass:string}){
  let url = DWURL + '/serve-sort-estim'
  return myaxios.get(url,params)
  },
  //按上门速度
  queryServeBySM(params:{page:number,pagesize:number,swork?:string,busclass:string}){
  let url = DWURL + '/serve-sort-sotime'
  return myaxios.get(url,params)
  },
  //按价格
  queryServeByJG(params:{page:number,pagesize:number,swork?:string,busclass:string}){
    let url = DWURL + '/serve-sort-price'
    return myaxios.get(url,params)
  }
}
export default serveApi